using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Routing;
using DotNetNuke.Web.Api;

namespace DynamicGeneration.Modules.WebApiExplorer
{
    public class RouteMapper : IServiceRouteMapper
    {
        public void RegisterRoutes(IMapRoute mapRouteManager)
        {
            var defaults = new RouteValueDictionary();
            defaults.Add("controller", "WebApiController");
            defaults.Add("action", "GetRichRouteData");
            var constraints = new RouteValueDictionary();

            mapRouteManager.MapHttpRoute("WebApiExplorerService", "default", "{controller}/{action}", defaults, constraints, new[] { "DynamicGeneration.Modules.WebApiExplorer" });
        }
    }
}
